<!DOCTYPE>
<html>
@include('common.head')
<body>
<!--header-->
@include('common.navbar')
<!-- header end -->
	
	
	
<div class="page-container"> 
  <div class="page-content" id="mainContents"> 
	  	<div class="container-fluid">
			<div class="row-fluid clearfix">
		    	<!-- BEGIN STYLE CUSTOMIZER -->
		        <div class="span12"> 	          		          
		          <h3 class="page-title"> &nbsp;  </h3>	          		          		          
		        </div>
		        <!-- END PAGE TITLE & BREADCRUMB--> 
		    </div>		
	
			<div class="row-fluid">
				<div class="tabbable tabbable-custom tabbable-full-width">	
					<ul class="nav nav-tabs">
						<li class="active"><a data-toggle="tab" href="#tab_1_12">订单详情</a></li>
					</ul>
					<div class="form-content">					
						<!---->
						<div class="row-fluid margin-bottom-25">								
							<div class="span12">			
								<!-- BEGIN VALIDATION STATES-->			
								<div class="portlet box gdcdc">		
									<div class="row-fluid clearfix detail-aller">
										<div class="span8">
											<div class="detail-tleft">	
												<div class="btn-group">	
													<!--<button id="sample_add_1" class="btn btn-success">
													新增订单
													</button>	-->
													<a href="/" id="sample_detaladd" class="btn btn-success">
													新增订单
													</a>
												</div>
												<div class="btn-group">	
													<button id="sample_detaledit" class="btn btn-primary">
													编辑订单
													</button>	
												</div>
												<div class="btn-group">	
													<button id="sample_detalagin" class="btn btn-default">
													再来一单
													</button>	
												</div>
												<div class="btn-group">	
													<button id="sample_detalcancel" class="btn btn-danger">
													取消订单
													</button>	
												</div>
												<div class="btn-group">	
													<button id="sample_detalhist" class="btn btn-warning">
													历史记录
													</button>	
												</div>
											</div>
										</div>										
										<div class="span4">
											<div class="detail-trgt">	
												<div class="btn-group">	
													<a href="/" id="sample_add_1" class="btn btn-danger">
													跳过
													</a>
												</div>
												<div class="btn-group">	
													<button id="sample_edit_2" class="btn btn-warning ">
													合同选择
													</button>	
												</div>
												<div class="btn-group">	
													<button id="sample_agin_3" class="btn btn-primary">
													下载合同
													</button>	
												</div>
												<div class="btn-group">	
													<button id="sample_cancelord" class="btn btn-success">
													上传合同
													</button>	
												</div>
											</div>
										</div>
									</div>
									<div class="row-fluid clearfix">
										<div class="span9">
											<!--基本信息-->
											<div class="detail-item-left">
												<ul class="breadcrumb">
										            <li><a href="javascript:;">基本信息</a></li>		            
										        </ul>
										        <div class="detal-form form-horizontal">
										        	<!--start-->
										        	<div class="row-fluid clearfix">
										        		<div class="span4">
										        			<div class="control-group">
																<label class="detal-label tanwid">订单编号：</label>
																<div class="controls mlft">{{$rs['order_detail']->order_id}}</div>			
															</div>
										        		</div>
										        		<div class="span4">
										        			<div class="control-group">
																<label class="detal-label tanwid">下单时间：</label>
																<div class="controls mlft">{{date("Y-m-d H:i:s",$rs['order_detail']->create_time)}}</div>			
															</div>
										        		</div>
										        		<div class="span4">
										        			<div class="control-group">
																<label class="detal-label tanwid">订单状态：</label>
																<div class="controls mlft yellcol">
																	@if($rs['order_detail']->status >= 0 && $rs['order_detail']->status <= 10)
																	合同处理
																	@endif
																	@if($rs['order_detail']->status >= 10 && $rs['order_detail']->status <= 20)
																	待上传资料
																	@endif
																	@if($rs['order_detail']->status >= 20 && $rs['order_detail']->status <= 30)
																	资质审核待认证
																	@endif
																	@if($rs['order_detail']->status >= 30 && $rs['order_detail']->status <= 40)
																	待OA审核
																	@endif
																	@if($rs['order_detail']->status >= 40 && $rs['order_detail']->status <= 50)
																	待支付
																	@endif
																	@if($rs['order_detail']->status >= 50 && $rs['order_detail']->status <= 60)
																	待发货
																	@endif
																	@if($rs['order_detail']->status >= 60 && $rs['order_detail']->status <= 70)
																	待收货
																	@endif
																	@if($rs['order_detail']->status >= 70 && $rs['order_detail']->status <= 80)
																	已完成
																	@endif
																	@if($rs['order_detail']->status >= 80 && $rs['order_detail']->status <= 90)
																	已取消
																	@endif
																</div>
															</div>
										        		</div>
										        	</div>
										        	<!--end-->
										        	<div class="row-fluid clearfix">
										        		<div class="span4">
										        			<div class="control-group">
																<label class="detal-label tanwid">订单类型：</label>
																<div class="controls mlft">
																	@switch($rs['order_detail']->property)
																	    @case('normal')
																	        普通
																	        @break
																		@case('poison')
																	        易制毒
																	        @break
																	    @case('detonate')
																	        易制爆
																	        @break
																	@endswitch
																</div>			
															</div>
										        		</div>
										        		<div class="span4">
										        			<div class="control-group">
																<label class="detal-label tanwid">客户名称：</label>
																<div class="controls mlft">{{$rs['order_basic']->cust_name}}</div>			
															</div>
										        		</div>
										        		<div class="span4">
										        			<div class="control-group">
																<label class="detal-label tanwid">客户属性：</label>
																<div class="controls mlft">{{config('order.order.cust_type.'.$rs['order_basic']->cust_type)}}</div>
															</div>
										        		</div>
										        	</div>
										        	
										        	<div class="row-fluid clearfix">
										        		<div class="span4">
										        			<div class="control-group">
																<label class="detal-label tanwid">订单账期：</label>
																<div class="controls mlft">{{config('order.order.order_period.'.$rs['order_basic']->order_period)}}</div>
															</div>
										        		</div>
										        		<div class="span4">
										        			<div class="control-group">
																<label class="detal-label tanwid">销售组织：</label>
																<div class="controls mlft">{{$rs['order_basic']->sales_org}}</div>			
															</div>
										        		</div>
										        		<div class="span4">
										        			<div class="control-group">
																<label class="detal-label tanwid">开单账套：</label>
																<div class="controls mlft">{{$rs['order_basic']->create_company}}</div>			
															</div>
										        		</div>
										        	</div>
										        	
										        	<div class="row-fluid clearfix">
										        		<div class="span4">
										        			<div class="control-group">
																<label class="detal-label tanwid">业务人员：</label>
																<div class="controls mlft">{{$rs['order_basic']->clerk}}</div>			
															</div>
										        		</div>
										        		<div class="span4">
										        			<div class="control-group">
																<label class="detal-label tanwid">支付方式：</label>
																<div class="controls mlft">{{config('order.order.payment.'.$rs['order_basic']->payment)}}</div>			
															</div>
										        		</div>
										        		<div class="span4">
										        			<div class="control-group">
																<label class="detal-label tanwid">币      种：</label>
																<div class="controls mlft">{{config('order.order.currency.'.$rs['order_basic']->currency)}}</div>			
															</div>
										        		</div>
										        	</div>
										        	
										        	<div class="row-fluid clearfix">
										        		<div class="span4">
										        			<div class="control-group">
																<label class="detal-label tanwid">配送方式：</label>
																<div class="controls mlft">{{config('order.order.deliver.'.$rs['order_basic']->deliver)}}</div>			
															</div>
										        		</div>
										        		<div class="span4">
										        			<div class="control-group">
																<label class="detal-label tanwid">发货公司：</label>
																<div class="controls mlft">{{config('order.order.supplier.'.$rs['order_basic']->supplier)}}</div>			
															</div>
										        		</div>
										        		<div class="span4">
										        			<div class="control-group">
																<label class="detal-label tanwid">下单人员：</label>
																<div class="controls mlft">todo</div>			
															</div>
										        		</div>
										        	</div>
										        	
										        	<div class="row-fluid clearfix">
										        		<div class="span4">
										        			<div class="control-group">
																<label class="detal-label tanwid">发票类型：</label>
																<div class="controls mlft">{{config('order.order.invoice_type.'.$rs['order_basic']->invoice_type)}}</div>			
															</div>
										        		</div>
										        		<div class="span4">
										        			<div class="control-group">
																<label class="detal-label tanwid">货齐发货：</label>
																<div class="controls mlft">todo</div>			
															</div>
										        		</div>
										        		<div class="span4">
										        			<div class="control-group">
																<label class="detal-label tanwid">是否折让：</label>
																<div class="controls mlft">todo</div>			
															</div>
										        		</div>
										        	</div>
										        	
										        	<div class="row-fluid clearfix">
										        		<div class="span4">
										        			<div class="control-group">
																<label class="detal-label tanwid">合同编号：</label>
																<div class="controls mlft">todo</div>			
															</div>
										        		</div>											        		
										        	</div>
										   
										        	<div class="row-fluid clearfix">
										        		<div class="span8">
										        			<div class="control-group">
																<label class="detal-label tanwid">备注信息：</label>
																<div class="controls mlft">
																	{{$rs['order_basic']->remark}}
																</div>			
															</div>
										        		</div>											        		
										        	</div>
										        	
										        </div>
											</div>
											<!--收货信息-->
											<div class="detail-item-left">
												<ul class="breadcrumb">
										            <li><a href="javascript:;">收货信息</a></li>		            
										        </ul>
										        <div class="detal-form form-horizontal">
										        	<!--start-->
										        	<div class="row-fluid clearfix">
										        		<div class="span4">
										        			<div class="control-group">
																<label class="detal-label tanwid">收货人员：</label>
																<div class="controls mlft">{{$rs['order_address']->name}}</div>			
															</div>
										        		</div>
										        		<div class="span4">
										        			<div class="control-group">
																<label class="detal-label tanwid">联系方式：</label>
																<div class="controls mlft">{{$rs['order_address']->mobile}}</div>			
															</div>
										        		</div>
										        		<div class="span4">
										        			<div class="control-group">
																<label class="detal-label tanwid">固定电话：</label>
																<div class="controls mlft">{{$rs['order_address']->telphone}}</div>			
															</div>
										        		</div>
										        	</div>
										        	<!--end-->										        	
										        	<div class="row-fluid clearfix">
										        		<div class="span8">
										        			<div class="control-group">
																<label class="detal-label tanwid">收货地址：</label>
																<div class="controls mlft">{{$rs['order_address']->address}}{{$rs['order_address']->detail}}</div>			
															</div>
										        		</div>											        		
										        	</div>
										        	
										        </div>
											</div>												
											<!--商品信息-->
											<div class="detail-item-left">
												<ul class="breadcrumb">
								          			<li><a href="javascript:;">商品信息</a></li>		            
								        		</ul>
										        <div class="detal-form form-horizontal">
										        	<!--start-->
										        	<div class="row-fluid">
														<div class="span12">	
															<!-- BEGIN EXAMPLE TABLE PORTLET-->
															<div class="portlet box light-grey" style="width: 98%; margin: 0 auto;">	
																<div class="portlet-body">	
																	<div class="ordertball table-responsive margin-bottom-20">
																	    <table class="table table-bordered tablelist" id="dataTableDetail">
														                    <thead class="tbhead">
															                    <tr>
															                        <th class="t1">
															                        	<p>库存编码</p>
															                        </th>
															                        <th class="t1">
															                        	<p>商品名称</p>
															                        </th>
															                        <th class="t1">
															                        	<p>产品属性</p>
															                        </th>
															                        <th class="t1">
															                        	<p>规格</p>
															                        </th>
															                        <th class="t1">
															                        	<p>单位</p>
															                        </th>
															                        <th class="t1">
															                        	<p>数量</p>
															                        </th>
															                        <th class="t1">
															                        	<p>含税单价</p>
															                        </th>
															                        <th class="t1">
															                        	<p>小计</p>
															                        </th>  
															                    </tr>
														                    </thead>
														                    <tbody class="tbbody" id="addertr">
														                    	@foreach ($rs['product'] as $product)   
															                    <tr>
															                        <td class="linhigh">{{$product['detail']->stock_num}}</td>
															                        <td class="linhigh">{{$product['detail']->name}}</td>
															                        <td class="linhigh prired">
															                        	@switch($product['detail']->property)
																						    @case('normal')
																						        普通
																						        @break
																							@case('poison')
																						        易制毒
																						        @break
																						    @case('detonate')
																						        易制爆
																						        @break
																						@endswitch
															                        </td>
															                        <td class="linhigh">{{$product['detail']->size}}{{$product['detail']->standard}}</td>
															                        <td class="linhigh">{{$product['detail']->pack}}</td>
															                        <td class="linhigh">
															                        	<input class="input-control otherwid j-ordernum" type="text" value="{{$product['num']}}" disabled>
															                        </td>
															                        <td class="linhigh">
															                        	<input class="input-control otherwid j-orshui" type="text" value="{{$product['price']}}" disabled>
															                        </td>
															                        <td class="linhigh">{{$product['total']}}</td>
															                    </tr>
															                    @endforeach
															                    
															                    <!--合计-->
															                    <tr>
															                        <td class="linhigh">合计</td>
															                        <td class="linhigh"></td>
															                        <td class="linhigh"></td>
															                        <td class="linhigh"></td>
															                        <td class="linhigh"></td>
															                        <!--总数量-->
															                        <td class="linhigh"></td>
															                        <td class="linhigh"></td>
															                        <!--总计-->
															                        <td class="linhigh">{{$rs['order_detail']->total_price}}</td>
															                    </tr>
														                    </tbody>
														               </table>
																	</div>
																</div>	
															</div>	
															<!-- END EXAMPLE TABLE PORTLET-->	
														</div>
													</div>
										        	
										        </div>
											</div>
											<!--服务信息-->
											<div class="detail-item-left">
												<ul class="breadcrumb">
										            <li><a href="javascript:;">服务信息</a></li>		            
										        </ul>
										        <div class="detal-form form-horizontal">
										        	<!--start-->
										        	<div class="row-fluid">
														<div class="span12">	
															<!-- BEGIN EXAMPLE TABLE PORTLET-->
															<div class="portlet box light-grey" style="width: 98%; margin: 0 auto;">	
																<div class="portlet-body">	
																	<div class="ordertball table-responsive margin-bottom-20">
																	    <table class="table table-bordered tablelist" id="dataTableDetail">
														                    <thead class="tbhead">
															                    <tr>	
															                        <th class="t1">
															                        	<p>序号</p>
															                        </th>
															                         <th class="t1">
															                        	<p>服务项目</p>
															                        </th>
															                        <th class="t1">
															                        	<p>单位</p>
															                        </th>
															                        <th class="t1">
															                        	<p>含税总价</p>
															                        </th>															                        
															                    </tr>
														                    </thead>
														                    <tbody class="tbbody" id="addertr">														                  
															                    <tr>
															                        <td class="linhigh">1</td>
															                        <td class="linhigh">运费</td>
															                        <td class="linhigh">箱</td>
															                        <td class="linhigh">??</td>
															                    </tr>
															                    <!--合计-->
															                    <tr>
															                        <td class="linhigh">合计</td>
															                        <td class="linhigh"></td>
															                        <td class="linhigh"></td>
															                        <!--总计-->
															                        <td class="linhigh">??</td>
															                    </tr>
														                    </tbody>
														               </table>
																	</div>
																</div>	
															</div>	
															<!-- END EXAMPLE TABLE PORTLET-->	
														</div>
													</div>
										        	
										        </div>
											</div>
											@include('order.detail_material_'.$rs['order_basic']->cust_type)
										</div>
										<!--right part-->
										<div class="span3">
											<!--费用结算-->
											<div class="detail-item-rgtpart">
												<ul class="breadcrumb">
								          <li><a href="javascript:;">费用结算</a></li>		            
								        </ul>
								        <div class="detal-form form-horizontal">
								        	<!--start-->
								        	<div class="row-fluid">
														<div class="span12">	
															<!-- BEGIN EXAMPLE TABLE PORTLET-->
															<div class="portlet box light-grey" style="width: 96%; margin: 0 auto;">	
																<div class="portlet-body">	
																	<div class="ordertball table-responsive margin-bottom-20">
																    <table class="table table-bordered tablelist" id="dataTableDetail">														                    
									                    <tbody class="tbbody" id="addertr">														                  
										                    <tr>
									                        <td class="linhigh">商品数量</td>
									                        <td class="linhigh">{{count($rs['product'])}}</td>
										                    </tr>
										                    <tr>
									                        <td class="linhigh">商品金额</td>
									                        <td class="linhigh">{{$rs['order_detail']->total_price}}</td>
										                    </tr>
										                    <tr>
									                        <td class="linhigh">成交总额</td>
									                        <td class="linhigh"></td>
										                    </tr>
									                    </tbody>
										               	</table>
																	</div>
																</div>	
															</div>	
															<!-- END EXAMPLE TABLE PORTLET-->	
														</div>
													</div>
								        </div>
											</div>
											<!--付款信息-->
											<div class="detail-item-rgtpart">
												<ul class="breadcrumb">
								          <li><a href="javascript:;">付款信息</a></li>		            
								        </ul>
								        <div class="detal-form form-horizontal">
								        	<!--start-->
								        	<div class="row-fluid">
														<div class="span12">	
															<!-- BEGIN EXAMPLE TABLE PORTLET-->
															<div class="portlet box light-grey" style="width: 96%; margin: 0 auto;">	
																<div class="portlet-body">	
																	<div class="ordertball table-responsive margin-bottom-20">
																    <table class="table table-bordered tablelist" id="dataTableDetail">														                    
									                    <tbody class="tbbody" id="addertr">														                  
										                    <tr>
									                        <td class="linhigh">会员优惠</td>
									                        <td class="linhigh">-0.00</td>
										                    </tr>
										                    <tr>
									                        <td class="linhigh">余额抵扣</td>
									                        <td class="linhigh">0.00</td>
										                    </tr>
										                    <tr>
									                        <td class="linhigh">应付金额</td>
									                        <td class="linhigh">{{$rs['order_detail']->total_price}}</td>
										                    </tr>
										                    <tr>
									                        <td class="linhigh">已付金额</td>
									                        <td class="linhigh">0.00</td>
										                    </tr>
										                    <tr>
									                        <td class="linhigh">未付金额</td>
									                        <td class="linhigh">{{$rs['order_detail']->total_price}}</td>
										                    </tr>
										                    <tr>
									                        <td class="linhigh">是否结清</td>
									                        <td class="linhigh">否</td>
										                    </tr>
									                    </tbody>
										               	</table>
																	</div>
																</div>	
															</div>	
															<!-- END EXAMPLE TABLE PORTLET-->	
														</div>
													</div>
								        </div>
											</div>
										</div>
									</div>
									
								</div>			
								<!-- END VALIDATION STATES-->			
							</div>
						</div>						
						<!--end tab-pane-->		
					</div>		
				</div>		
				<!--end tabbable-->           
			</div>
			
		</div>
    </div>
</div>
	
<!-- footer -->
@include('common.footer')
<script type="text/javascript" src="{{URL::asset('static/js/public/app.js')}}"></script>
<script>
	jQuery(document).ready(function() {   
	   // initiate layout and plugins
	   App.init();
	});

	//$(".j-ordernum").attr("disabled",false);//启用input标签

</script>
</body>

</html>